function compileQueryParser(val) {
    var fn;

    switch (val) {
      case false:
        fn = newObject;
        break;
      case 'extended':
        fn = parseExtendedQueryString;
        break;
      default:
        throw new TypeError('unknown value for query parser function: ' + val);
    }
  
    return fn;
  }

  function parseExtendedQueryString(str) {
    return str
  }
  function newObject() {
    return {};
  }

  console.log(compileQueryParser(false))
